import org.junit.jupiter.api.Test;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Locale;

/**
 * @author: LunBoWang
 * @description: TODO
 * @date: 2025/7/21 下午8:53
 * @version: 1.0
 */

public class test {
    @Test
    public void test(){
        LocalDateTime now = LocalDateTime.now();

        // 定义中文格式
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern(
                "yyyy年M月d日H时m分",
                Locale.CHINA
        );

        // 格式化时间
        String formattedDateTime = now.format(formatter);
        System.out.println(formattedDateTime);
    }
}
